//
//  LHEmptyView.m
//  lhcx
//
//  Created by 赵永杰 on 2017/6/12.
//  Copyright © 2017年 zhaoyongjie. All rights reserved.
//

#import "LHEmptyView.h"

@interface LHEmptyView ()

@property (nonatomic, strong) UIImageView *iconImage;

@end

@implementation LHEmptyView

#pragma mark - LifeCycle


 - (instancetype)initWithFrame:(CGRect)frame {
 self = [super initWithFrame:frame];
 if (self) {
 [self setupChildViews];
 }
 return self;
 }



#pragma mark - Private

- (void)setupChildViews {
    [self addSubview:self.descLabel];
    [self addSubview:self.iconImage];
    [self setNeedsUpdateConstraints];

}

- (void)updateConstraints {
    [super updateConstraints];
    
    [self.descLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.centerY.equalTo(self);
    }];
    
    [self.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.bottom.equalTo(self.descLabel.mas_top).with.offset(-20);
//        make.size.mas_equalTo(CGSizeMake(71, 71));
    }];
    
}

#pragma mark - Action

#pragma mark - Getter

- (UIImageView *)iconImage {
    if (!_iconImage) {
        _iconImage = [[UIImageView alloc] init];
        _iconImage.image = [UIImage imageNamed:@"unsolve_place"];
    }
    return _iconImage;
}

- (UILabel *)descLabel {
    if (!_descLabel) {
        _descLabel = [[UILabel alloc] init];
        _descLabel.text = @"暂无可提现车单哟~";
        _descLabel.textColor = GRAYCOLOR;
        _descLabel.font = [UIFont systemFontOfSize:14];
    }
    return _descLabel;
}

#pragma mark - Setter

@end
